package com.thz.friend.mapper.user;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.thz.friend.pojo.user.UserSubmit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserSubmitMapper extends BaseMapper<UserSubmit> {

    UserSubmit selectCurrentUserSubmit(Long userId, Long examId, Long questionId, String currentTime);

    List<Long> selectHostQuestionList();

    @Select("select COUNT(*) FROM tb_user_submit WHERE create_user=#{userId} AND pass=1 AND course_id IS NULL ")
    List<UserSubmit> selectExamPassList(Long userId);
}
